package com.rany.day06.demo01;

import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        Person p = new Person("linwei",27);
        System.out.println(p);

        Person p1 = new Person("linwei1",27);
        Person p2 = new Person("linwei2",27);
        boolean equals = p1.equals(p2);
        System.out.println(equals);
        p1 = p2;
        System.out.println(p1.equals(p2));
        System.out.println(p1);
        System.out.println(p2);

        boolean equals1 = Objects.equals(p1, p2);
        System.out.println(equals1);
    }
}
